{{define "head"}}  {{end}}

{{define "body"}}
<div class="container-fluid p-t-15">
  
    <div class="row">
      <div class="col-lg-12">
        <div class="card">
          <div class="card-body">
            
            <form action="/admin/setting/adminuser/save" method="post" class="row ajaxForm"  autocomplete="off">
            <input type="hidden" name="uid" value="{{.adminUser.Uid}}"/>
             
            <div class="form-group col-md-12">
                <label for="title">用户名</label>
                {{if .adminUser.Username}}
                    <p class="form-control-static">{{.adminUser.Username}}</p>
                    <input type="hidden" name="username" value="{{.adminUser.Username}}">
                {{else}}
                    <input type="text" class="form-control" name="username" value="" autocomplete="off" />
                {{end}}
            </div>

            <div class="form-group col-md-12">
                <label for="title">密码</label>
                <input type="password" class="form-control" name="password" value="" autocomplete="off" placeholder="不修改密码则不填"/>
            </div>

            <div class="form-group col-md-12">
                <label for="type">角色</label>
                <div class="form-controls">

                  <div class="col-xs-12">
                    {{range .adminGroups}}
                      <label class="checkbox-inline" for="example-inline-checkbox3">
                        {{if judegInMap . $.groupMap}}
                        <input type="checkbox" checked id="example-inline-checkbox3" name="groupname[]" value="{{.}}">{{.}}
                        {{else}}
                        <input type="checkbox" id="example-inline-checkbox3" name="groupname[]" value="{{.}}">{{.}}
                        {{end}}
                      </label>
                    {{end}}
                  </div>
                </div>
              </div>

            <div class="form-group col-md-12">
                <label for="title">姓名</label>
                <input type="text" class="form-control" name="nickname" value="{{.adminUser.Nickname}}"/>
            </div>

            <div class="form-group col-md-12">
                <label for="title">手机号</label>
                <input type="text" class="form-control" name="phone" value="{{.adminUser.Phone}}"/>
            </div>
              
            <div class="form-group col-md-12">
                <button type="submit" class="btn btn-primary ajax-post" target-form="add-form">确 定</button>
                <button type="button" class="btn btn-default" onclick="javascript:location.href=document.referrer">返 回</button>
            </div>
            </form>
   
          </div>
        </div>
      </div>
      
    </div>
    
  </div>
{{end}}

{{define "script"}} {{end}}